package com.example.mapper;

import com.example.pojo.Label;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LabelMapper {

    @Select("select * from t_label where label_name=#{labelName} and del_flag=0")
    @ResultMap("LabelResult")
    Label selectByLabelName(String labelName);

    @Select("select * from t_label where id between #{startId} and #{endId}")
    @ResultMap("LabelResult")
    List<Label> selectByIdRange(@Param("startId") Long startId, @Param("endId") Long endId);
}
